
<template>
	<div class="index">

		<div class="center">
			<left></left>
			<div class="right">
          <top></top>
          <!-- <div class="hei10"></div>
          <div class="where" style="background: #fff; padding: 10px 30px; font-size: 14px; color: #595959;">当前位置：分销后台><router-link to="/productionDelivery" style="color: #409eff;">商品销售中心</router-link></div>
          --><div class="hei10"></div>


				<div class="o_ul">
					<router-link class="o_li acts bgw" to="/productionDelivery">销售中的商品</router-link>
					<router-link class="o_li" to="/productionDelivery/productionDeliverysale">已下架的商品</router-link>
				</div>
				<div class="row btm">
					<el-form ref="form" @submit.native.prevent :model="form" label-width="80px">
						<div class="searchflex">
							<el-form-item label="商品名称" class="bgh">
								<el-input v-model="form.title" placeholder="商品名称"></el-input>
							</el-form-item>
							<el-form-item label="供应商" class="bgh">
								<el-input v-model="form.parent_name" placeholder="供应商"></el-input>
							</el-form-item>
							<el-form-item label="产品渠道" class="bgh">
								<el-input v-model="form.product_name" placeholder="产品渠道"></el-input>
							</el-form-item>
							<el-form-item label="商品编码" class="bgh">
								<el-input v-model="form.fetch_code" placeholder="商品编码"></el-input>
							</el-form-item>
              <el-form-item label="卖点" class="bgh">
              	<el-input v-model="form.selling_point" placeholder="卖点"></el-input>
              </el-form-item>

							<el-form-item label="运营商" class="bgh">
								<el-select v-model="form.operator" placeholder="请选择运营商:">
									<el-option v-for="item in sanlist" :key="item.id" :label="item.name" :value="item.id"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="发货地址" class="bgh">
								<el-input v-model="form.warn_province" placeholder="检索可发往该地区的商品"></el-input>
							</el-form-item>
							<!-- <el-form-item class="w330" label="归属地" prop="city">
								<el-cascader @change="changeaddress" v-model="form.city" :options="citylist"></el-cascader>
							</el-form-item> -->

              <el-form-item class="w330 bgh" label="归属地:" >
              	<el-cascader @change="changeaddress"  :checkStrictly="true" :props="{ checkStrictly: true }"  v-model="form.citys" :options="citylist"></el-cascader>
              </el-form-item>

              <el-button type="danger" style="margin-left: 20px; height: 40px;" round @click="search">搜索</el-button>
						</div>

					</el-form>

				</div>

        <!-- <div style="padding: 20px;" class="btm">
          <div class="kflexc">
            <div style="flex:5; background: rgb(254, 244, 245); padding: 15px 30px; border-radius: 20px;">
              <div class="kflexbc">
                <div class="kflexc">
                  <div style="padding: 22px; border-radius: 20px; background: #fff;"><img src="https://file.storep.91haoka.cn/gantanhao/gth111.png" style="width: 36px;"></div>
                  <div style="color: #2974FF; font-size: 24px; margin-left: 20px;">我的微小店</div>
                </div>
                <div class="kflexc">
                  <div style="color: #2974FF; font-size: 24px; border-bottom: 1px #2974FF solid; cursor: pointer;" @click="goshop">打开微小店</div>
                  <div style="color: #2974FF; font-size: 24px; border-bottom: 1px #2974FF solid; cursor: pointer; margin-left: 40px;"  @click="go('/weixiaodianxin')">微小店配置</div>
                  <div style=" margin-left: 40px;">
                    <el-tooltip class="item" effect="light" content="在微信等手机端分享自己的小店，线上传播销售，使用连接可对接线上任意广告位跳转" placement="top">
                      <i class="el-icon-question" style=" color: #2974FF; font-size: 35px;"></i>
                    </el-tooltip>
                  </div>
                </div>
              </div>
            </div>

            <div class="kflexbc" style="flex:3; background: rgb(254, 244, 245); padding: 15px 30px; border-radius: 20px; margin-left: 20px;">


                <div class="kflexc">
                  <div style="padding: 22px; border-radius: 20px; background: #fff;"><img src="https://file.storep.91haoka.cn/gantanhao/gth222.png" style="width: 36px;"></div>
                  <div style="color: #2974FF; font-size: 24px; margin-left: 20px;" @click="goWebsite">线上推广站点管理</div>
                  <div><img src="https://file.storep.91haoka.cn/gantanhao/gth333.png" style="width: 32px; margin-left: 20px; cursor: pointer;"  @click="goWebsite"></div>
                </div>

                <div>
                  <el-tooltip class="item" effect="light" content="用于抖音微博等各个渠道的推广分类记录，不同站点链接的订单来源名称不同" placement="top">
                  	<i class="el-icon-question" style=" color: #2974FF; font-size: 35px;"></i>
                  </el-tooltip>
                </div>


            </div>
          </div>
        </div> -->
        <!-- <div class="row3">
        	<div class="row2">
        		<div style="display: flex;">
        			<div class="dlogo"><img src="../../../static/img/dianlogo.png"></div>
        			<div class="dtitle" @click="goshop">我的微小店地址>></div>
        		</div>
            <div class="kflexc">
              <div style="margin-right: 20px; cursor: pointer;" @click="go('/weixiaodianxin')">微小店配置</div>
              <el-tooltip class="item" effect="light" content="在微信等手机端分享自己的小店，线上传播销售，使用连接可对接线上任意广告位跳转" placement="top">
              	<div class="dlogo2" style="top:0">?</div>
              </el-tooltip>
            </div>


        	</div>
        	<div style="height: inherit;width: 1px;background: #fff;"></div>
        	<div class="row2">
        		<div style="display: flex;">
        			<div class="dlogo wlogo"><img src="../../../static/img/weblogo.png"></div>
        			<div class="dtitle" @click="goWebsite">线上推广站点管理>></div>
        		</div>

        		<el-tooltip class="item" effect="light" content="用于抖音微博等各个渠道的推广分类记录，不同站点链接的订单来源名称不同" placement="top">
        			<div class="dlogo2">?</div>
        		</el-tooltip>

        	</div>

        </div> -->

				<div class="row2" style="align-items: center;">
					<div class="btm2">
						<el-button type="danger" round v-if="P0202" @click="goto('productionBasismanag/addBasis?allshow=allshow')">发布全新套餐</el-button>
						<el-button type="danger" round v-if="P0202" @click="goto('productionDelivery/addShop')">基于已有产品渠道发布商品</el-button>
						<el-button type="danger" round v-if="P0203" @click="goto('productionDelivery/productionOther')">添加供应商提供的套餐</el-button>

						<el-dropdown v-if="P0202" trigger="click" @command="handleCommand" style="margin-left: 20px; color: #2974FF; cursor: pointer;">
							<span class="el-dropdown-link">
								更多操作<i class="el-icon-arrow-down el-icon--right"></i>
							</span>
							<el-dropdown-menu slot="dropdown">
								<!-- <el-dropdown-item command="goyugu">设置商品预估收入</el-dropdown-item> -->
								<!-- <el-dropdown-item command="daochu">导出在售商品</el-dropdown-item> -->
								<el-dropdown-item command="goshangxiajia">上下架、佣金、返利记录</el-dropdown-item>
								<!-- <el-dropdown-item command="piliangtongbu">批量同步至个人分销系统</el-dropdown-item> -->
                <el-dropdown-item command="piliangxiajia">批量下架</el-dropdown-item>
							</el-dropdown-menu>
						</el-dropdown>

						<!--                <el-button type="primary" style="padding: 9px 14px !important;" @click="goyugu">设置商品预估收入</el-button>
                <el-button type="primary" style="padding: 9px 14px !important;" v-if="func_C02" @click="daochu">导出在售商品</el-button>
                <el-button type="primary" style="padding: 9px 14px !important;"  @click="goshangxiajia">上下架记录</el-button> -->

					</div>
					<div class="only">
						<!-- <el-checkbox v-model="checked" style="margin-right: 20px; font-size:18px;" @change='chooseparid'>只显示我发布的商品</el-checkbox> -->

					</div>
				</div>

				<div class="con" v-loading="loading" style="padding: 20px;">
          <div style="padding:0px 10px; line-height: 40px; margin:10px 0; background: rgb(255, 251, 230); border: 1px solid rgb(255, 229, 143); border-radius: 10px; font-size: 14px; color: rgba(0, 0, 0, 0.65);">
            <i class="el-icon-warning" style="color:rgb(255, 229, 143); font-size: 20px; margin-right: 10px;"></i>在售商品中罗列的商品如果是继承自上游供应商，那么上游供应商下架商品，本地会自动下架。
          </div>
          <el-table :data="list" border style="color: #666; font-size: 14px;"
		  ref="multipleTable"
		  @selection-change="handleSelectionChange" >
			<el-table-column
			type="selection"
			width="55">
			</el-table-column>
            <el-table-column label="商品信息" width="500" align="center" className="my-cell">
              <template slot-scope="scope" style="position: relative;">
				<div v-if="scope.row.delay_at" class="t_djs">下架倒计时:{{ scope.row.djs }}</div>
                <!-- <div style="position: absolute; right: 10px; top: 10px; display: flex;">
                  <div v-if="scope.row.is_main == 1" style="background: #EEF7FF; color: #fff; font-size:12px; padding: 0px 10px; border-radius:3px; margin-right: 10px;">主推</div>
                  <div v-if="scope.row.is_top == 1"  style="background: #9600ff; color: #fff; font-size:12px; padding: 0px 10px; border-radius:3px;">置顶</div>
                </div> -->
                <div style="display: flex; text-align: left; position: relative; ">


                  <div style="cursor: pointer; position: relative; width: 140px; height:110px; margin:0 20px 0 10px;  overflow: hidden;" @click="tiaozhuan(scope.row.id,scope.row.order_pages_id,scope.row.product_id)" v-if="scope.row.image1 == ''">
                    <img src="../../../static/img/kenan.jpg" style="width:110px; ">
                    <div v-if="scope.row.sign_type == 2 && (shop_id == 304676 || shop_id == 50481)" style="position: absolute; top: 5px; right: 15px; background: rgba(153, 85, 240,0.5); width: 27px; text-align: center; color: #fff; font-weight: bold; padding: 2px; border-radius: 2px;">D</div>
                    <div v-if="scope.row.sign_type == 1 && (shop_id == 304676 || shop_id == 50481)" style="position: absolute; top: 5px; right: 15px; background: rgba(254, 149, 54,0.5); width: 27px; text-align: center; color: #fff; font-weight: bold; padding: 2px; border-radius: 2px;">Z</div>
                  </div>
                  <div style="cursor: pointer; position: relative; width: 140px; height:110px; margin:0 20px 0 10px; overflow: hidden;" @click="tiaozhuan(scope.row.id,scope.row.order_pages_id,scope.row.product_id)" v-if="scope.row.image1 != ''">
                      <img :src="scope.row.image1" style="width:110px; ">
                      <div v-if="scope.row.sign_type == 2 && (shop_id == 304676 || shop_id == 50481)" style="position: absolute; top: 5px; right: 15px; background: rgba(153, 85, 240,0.5); width: 27px; text-align: center; color: #fff; font-weight: bold; padding: 2px; border-radius: 2px;">D</div>
                      <div v-if="scope.row.sign_type == 1 && (shop_id == 304676 || shop_id == 50481)" style="position: absolute; top: 5px; right: 15px; background: rgba(254, 149, 54,0.5); width: 27px; text-align: center; color: #fff; font-weight: bold; padding: 2px; border-radius: 2px;">Z</div>
                  </div>

                  <!-- <div style="cursor: pointer;height: 80px; width: 80px; margin-right: 10px; overflow: hidden;: hidden;" @click="tiaozhuan(scope.row.id,scope.row.order_pages_id,scope.row.product_id)">
                    <img :src="scope.row.image1" style="width: 80px; "></div> -->
                  <div  style="width:385px">
                    <div  style="font-size: 14px; margin-bottom: 5px;">
                      <div v-if="scope.row.is_main == 1" style="background: #2974FF; float: left; color: #fff; width: 50px; text-align: center; font-size:12px; padding: 0px 10px; border-radius:3px; margin-right: 10px;">主推</div>
                      <div v-if="scope.row.is_top == 1"  style="background: #9600ff; float: left; color: #fff;  width: 50px; text-align: center; font-size:12px; padding: 0px 10px; border-radius:3px;  margin-right: 10px;">置顶</div>
                      <div style="color: #197CFF;   cursor: pointer;" @click="tiaozhuan(scope.row.id,scope.row.order_pages_id,scope.row.product_id)">{{scope.row.title}}</div>
                    </div>


                    <div style="font-size: 14px; margin-bottom: 5px; font-weight: bold; display: flex; flex-wrap: wrap;" v-if="scope.row.selling_point != ''">

                      <div v-for="item in scope.row.selling_point" :key="item" class="yansebutong">
                        <el-tooltip class="item" effect="dark" :content="item" placement="top-start"  v-if="item.length > 11">
                          <div class="slh">{{item}}</div>
                        </el-tooltip>
                        <div  class="slh" v-if="item.length <= 11">{{item}}</div>
                      </div>
                    </div>

                    <div style=" margin-bottom: 5px;" @dblclick="copycode(scope.row.fetch_code)">商品编码:{{scope.row.fetch_code}}</div>
                    <div style="">发布时间：{{scope.row.created_at}}</div>

                  </div>
                </div>
              </template>
            </el-table-column>
            <el-table-column label="供应商&产品"  align="center">
              <template slot-scope="scope">
                <div>
                	<div style="width: 100%; line-height: 24px;" v-if="scope.row.parent_name != '' && P0204">{{scope.row.parent_name}}</div>
                	<div style="width: 100%; line-height: 24px;">{{scope.row.parent_title}}</div>
                </div>
                <div v-if="P0204">{{scope.row.commission_rules}}</div>

                <div>
                	<!-- <el-button v-if="P0203" type="text" size="mini" @click="eee(scope.row.id,scope.row.product_id,scope.row.title,scope.row.page_id)"><img src="../../../static/img/qiehuan.png"
                		 style="width: 18px; position: relative; top: 3px;">切换产品渠道</el-button> -->
                </div>
               <!-- "in_province_order_ratio": 0, //要求省内比例
                "in_province_percent": 0, //当前省内比例
                "is_over_ratio": 0, //是否超过要求比例
                "is_existed_in_province": 0 //是否存在比例配置 -->
                <div v-if="scope.row.is_existed_in_province">
                  要求省内：{{scope.row.in_province_order_ratio}}%
                </div>
                <div v-if="scope.row.is_existed_in_province" class="kflexc">
                  <el-tooltip class="item" effect="light" :content="'当前省内占比' + scope.row.in_province_percent" placement="top">
                    <el-progress v-if="!scope.row.is_over_ratio" :percentage="scope.row.in_province_percent" stroke-width="16" color="#F9B202" :text-inside="true" style="width: 180px;"></el-progress>
                  </el-tooltip>
                  <el-tooltip class="item" effect="light" :content="'当前省内占比' + scope.row.in_province_percent" placement="top">
                    <el-progress v-if="scope.row.is_over_ratio" :percentage="scope.row.in_province_percent" stroke-width="16" color="#00D50F" :text-inside="true" style="width: 180px;"></el-progress>
                  </el-tooltip>
                  <div style="color: rgb(64, 158, 255); margin-left: 10px; cursor: pointer;" @click="ppp2(scope.row.id,scope.row.product_id,scope.row.title)">查看卡单队列></div>
                </div>
              </template>
            </el-table-column>
            <el-table-column label="分销佣金&提卡费" align="center">
              <template slot-scope="scope">
                <div style="min-height: 100px;"  v-if="P0207">
                  <div>提卡费：{{scope.row.tika_cost}}元</div>
                  <div v-if="scope.row.page_id == null">佣金：{{scope.row.commission}}元</div>
                  <div v-if="scope.row.page_id != null" >
                  	<span>佣金规则：{{scope.row.rules}} </span>
                  	<span v-if="scope.row.active_commission != 0">已激活，佣金{{scope.row.active_commission}}元.</span>
                  	<span v-if="scope.row.first_recharge_one_commission != 0">首充大于等于{{scope.row.first_recharge_one}}元，佣金{{scope.row.first_recharge_one_commission}}元</span>
                  	<span v-if="scope.row.first_recharge_two_commission != 0">或者首充大于等于{{scope.row.first_recharge_two}}元，佣金{{scope.row.first_recharge_two_commission}}元.</span>
                  	<span v-if="scope.row.recharge_amount_one_commission != 0">累计充值大于等于{{scope.row.recharge_amount_one}}元，佣金{{scope.row.recharge_amount_one_commission}}元</span>
                  	<span v-if="scope.row.recharge_amount_two_commission != 0">且累计充值大于等于{{scope.row.recharge_amount_two}}元，佣金{{scope.row.recharge_amount_two_commission}}元.</span>
                  </div>
                  <div class="alt" v-if="scope.row.commission_rule != ''">结算要求：{{scope.row.commission_rule}}</div>
                  <div style="color: #409EFF; cursor: pointer;" @click="biangengshow(scope.row.page_id,scope.row.parent_id)">佣金变更记录</div>
                </div>
                <div v-if="checkquanxian('P02010').length > 0 && scope.row.commission_notes">内部佣金：{{scope.row.commission_notes }}</div>
                <div v-if="P0202">
                	<el-button type="text" @click="aaa(scope.row.id,scope.row.product_id,scope.row.title)">佣金及分销商可见</el-button>
                </div>
              </template>
            </el-table-column>
            <el-table-column label="分销商" width="150" align="center">
              <template slot-scope="scope">
                <el-button type="text" v-if="P0203" @click="ppp(scope.row.id,scope.row.product_id,scope.row.title)">查看分销商</el-button>
              </template>
            </el-table-column>
            <el-table-column label="编辑商品"  width="150" align="center">
              <template slot-scope="scope">
                <div  style="height: 100px;">
                	<div style="color: #409EFF; cursor: pointer; margin-bottom: 10px;" v-if="scope.row.id == scope.row.order_pages_id && P0202" @click="bbb(scope.row.id,scope.row.product_id,scope.row.title)">修改产品信息</div>
                	<div style="color: #409EFF; cursor: pointer; margin-bottom: 10px; " v-if="P0202" @click="ccc(scope.row.id,scope.row.product_id,scope.row.title)">修改商品信息</div>
                	<div style="color: #409EFF; cursor: pointer; margin-bottom: 10px; " v-if="(dianpuid == 50481 && P0202) || (dianpuid == 304676 && P0202)" @click="fff(scope.row.id,scope.row.product_id,scope.row.title)">设置商品返利</div>

                </div>
                <div class="kflexcc">
                  <div v-if="P0202" style="color: #409EFF; cursor: pointer;" @click="xiajia(scope.row.id,scope.row.delay_at)">下架</div>

                  <!-- <div style="color: #409EFF; cursor: pointer; margin-left: 5px;" @click="chaizhuan(scope.row,1)">转单</div>
                  <div style="color: #409EFF; cursor: pointer; margin-left: 5px;" @click="chaizhuan(scope.row,2)">拆单</div> -->
                </div>
                <!-- <div style="color: #409EFF; cursor: pointer; margin-bottom: 10px; " v-if="(dianpuid == 50481 && P0208) || (dianpuid == 304676 && P0208)" @click="kefu(scope.row.id,scope.row.product_id,scope.row.title)">AI客服配置</div> -->
              </template>
            </el-table-column>
            <el-table-column label="操作"  width="150" align="center">
              <template slot-scope="scope">
                <!-- <div style="cursor: pointer;"><img src="https://file.storep.91haoka.cn/gantanhao/zhuandan.gif" @click="chaizhuan(scope.row,1)"></div> -->
                <!-- <div class="dh" @click="chaizhuan(scope.row,1)">
                  转单 拆单
                  <div class="dh2"></div>
                </div> -->
                <div v-if="scope.row.is_main == 0" class="kflexcc">
                  <div style="color: #409EFF;" @click="zhiding2(scope.row,1)">添加到主推</div>
                  <el-tooltip class="item" effect="dark" content="主推后分销商添加上游商品时将优先看到主推商品" placement="top-start">
                  	<i class="el-icon-question" style="color: #409EFF; font-size: 20px; margin-left: 5px; cursor: pointer;" ></i>
                  </el-tooltip>
                </div>

                <div><el-button type="text" v-if="scope.row.is_main == 1"  @click="zhiding2(scope.row,0)">取消主推</el-button></div>

                <div><el-button type="text" v-if="scope.row.is_top == 0"  @click="zhiding(scope.row,1)">置顶</el-button></div>

                <div><el-button type="text" v-if="scope.row.is_top == 1"  @click="zhiding(scope.row,0)">放弃置顶</el-button></div>
                <div><el-button type="text"  @click="share(scope.row.id,scope.row.title,scope.row.take_number,scope.row.link_params)">下单链接>></el-button></div>
              </template>
            </el-table-column>
          </el-table>



					<!-- <div class="list" style="padding-bottom: 0; padding-top: 0; background: #F9F9F9;">
						<div class="th1 bor1">商品名称</div>
						<div class="th8 bor1">供应商&产品</div>
						<div class="th4 bor1">分销佣金&提卡费</div>
						<div class="th2 bor1">分销商</div>
						<div class="th5 bor1">编辑商品</div>
						<div class="th6">操作</div>
					</div>
					<div class="list" v-for="item in list" :key="item.id">
						<div class="td1" @click="tiaozhuan(item.id,item.order_pages_id,item.product_id)">
							<img :src="item.image1" v-if="item.image1 != ''">
							<img src="../../../static/img/kenan.jpg" v-if="item.image1 == ''">
						</div>

						<div class="td2 bor1">
							<div class="title" @click="tiaozhuan(item.id,item.order_pages_id,item.product_id)">{{item.title}}</div>
							<div class="yd" v-if="item.selling_point != ''" @click="tiaozhuan(item.id,item.order_pages_id,item.product_id)">
								<span v-for="(item2,i) in item.selling_point" :key="i">{{item2}}</span>
							</div>

							<div style="line-height: 30px;" @dblclick="copycode(item.fetch_code)">商品编码:{{item.fetch_code}}</div>
							<div style="line-height: 30px;">发布时间：{{item.created_at}}</div>
						</div>
						<div class="td4 bor1" style="">
							<div style="height: 100px;">
								<div style="width: 100%; height: 50px; line-height: 24px;" v-if="item.parent_name != ''">{{item.parent_name}}</div>
								<div style="width: 100%; height: 50px;  line-height: 24px;">{{item.parent_title}}</div>
							</div>

							<div>
								<el-button v-if="P0203" type="text" size="mini" @click="eee(item.id,item.product_id,item.title)"><img src="../../../static/img/qiehuan.png"
									 style="width: 18px; position: relative; top: 3px;">切换产品渠道</el-button>
							</div>
						</div>
						<div class="td8 bor1" v-if="item.product_shop_id != item.shop_id" style="display: flex; align-items: center; ">
							<div style="width: 100%;">
								<div style="height: 100px; overflow: hidden;">
									<el-tooltip effect="dark" popper-class="tooltip" placement="top">
										<div slot="content">提卡费：{{item.tika_cost}}元</div>
										<div style="text-align: left; padding: 0px 15px; height: 50px;">提卡费：{{item.tika_cost}}元</div>
									</el-tooltip>
									<div v-if="item.page_id == null" class="td3" style="text-align: left; padding: 0 15px;">佣金：{{item.commission}}元
									</div>
									<div v-if="item.page_id != null" style="text-align: left; padding: 0 15px;;">
										<el-tooltip effect="dark" popper-class="tooltip" placement="top">
											<div slot="content">
												<span> 佣金规则：{{item.rules}} </span>
												<span v-if="item.active_commission != 0">已激活，佣金{{item.active_commission}}元.</span>
												<span v-if="item.first_recharge_one_commission != 0">首充大于{{item.first_recharge_one}}元，佣金{{item.first_recharge_one_commission}}元</span>
												<span v-if="item.first_recharge_two_commission != 0">或者首充大于{{item.first_recharge_two}}元，佣金{{item.first_recharge_two_commission}}元.</span>
												<span v-if="item.recharge_amount_one_commission != 0">累计充值大于{{item.recharge_amount_one}}元，佣金{{item.recharge_amount_one_commission}}元</span>
												<span v-if="item.recharge_amount_two_commission != 0">且累计充值大于{{item.recharge_amount_two}}元，佣金{{item.recharge_amount_two_commission}}元.</span>
											</div>
											<div style="height: 40px; line-height: 20px; overflow: hidden;  ">
												<span>佣金规则：{{item.rules}} </span>
												<span v-if="item.active_commission != 0">已激活，佣金{{item.active_commission}}元.</span>
												<span v-if="item.first_recharge_one_commission != 0">首充大于{{item.first_recharge_one}}元，佣金{{item.first_recharge_one_commission}}元</span>
												<span v-if="item.first_recharge_two_commission != 0">或者首充大于{{item.first_recharge_two}}元，佣金{{item.first_recharge_two_commission}}元.</span>
												<span v-if="item.recharge_amount_one_commission != 0">累计充值大于{{item.recharge_amount_one}}元，佣金{{item.recharge_amount_one_commission}}元</span>
												<span v-if="item.recharge_amount_two_commission != 0">且累计充值大于{{item.recharge_amount_two}}元，佣金{{item.recharge_amount_two_commission}}元.</span>
											</div>
										</el-tooltip>
									</div>
									<div class="alt" style="text-align: left; padding: 0 20px; height: 40px; line-height: 20px; overflow: hidden;"
									 v-if="item.commission_rule != ''">结算要求：{{item.commission_rule}}</div>
								</div>
								<div style="text-align: center; width: 100%;">
									<el-button v-if="P0202" type="text" size="mini" style="line-height: 26px;" @click="aaa(item.id,item.product_id,item.title)">佣金及分销商可见</el-button>
								</div>
							</div>
						</div>
						<div class="td3 bor1" style="display: flex; align-items: center; justify-content: center;">
							<el-button type="text" v-if="P0203" size="mini" @click="ppp(item.id,item.product_id,item.title)">查看分销商</el-button>
						</div>

						<div class="td6 bor1">
							<div class="tdbtn">
								<div style="height: 100px;">
									<div v-if="item.id == item.order_pages_id && P0202" @click="bbb(item.id,item.product_id,item.title)">修改产品信息</div>
									<div v-if="P0202" @click="ccc(item.id,item.product_id,item.title)">修改商品信息</div>
									<div v-if="(dianpuid == 50481 && P0202) || (dianpuid == 304676 && P0202)" @click="fff(item.id,item.product_id,item.title)">设置商品返利</div>
								</div>

								<div v-if="P0202" style="line-height: 42px;" @click="xiajia(item.id)">下架</div>
							</div>

						</div>
						<div class="td7" style="display: flex; align-items: center; justify-content: center;">
							<el-button type="text" size="mini" @click="share(item.id,item.title)">推广链接>></el-button>
						</div>
					</div> -->
					<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="fanye" :page-size="pagesize"
					 :total="total"></el-pagination>
				</div>
			</div>
		</div>
		<el-dialog :close-on-click-modal="false" title="下单链接" :visible.sync="log" width="840px">
			<div style="padding-left: 60px;">默认生成的链接</div>
			<div class="tk">
				<div class="link">下单链接地址：{{link}} </div>
				<div class="link">
					<el-button type="danger" size="mini" @click="copy" style="padding:7px 20px !important; ">复制链接</el-button>
					<el-button type="danger" size="mini" @click="open" style="padding:7px 20px !important; ">打开链接</el-button>
				</div>



				<div class="er">
					<qrcode :value="link" id="canvas" :options="{ size: 170 }"></qrcode>
				</div>

        <div class="link" v-if="choosetake_number != 0">选号下单链接地址：{{link11}} </div>
        <div class="link" v-if="choosetake_number != 0">
        	<el-button type="danger" size="mini" @click="copy11" style="padding:7px 20px !important; ">复制链接</el-button>
        	<el-button type="danger" size="mini" @click="open11" style="padding:7px 20px !important; ">打开连接</el-button>
        </div>


			</div>
      <div style="padding: 20px 60px;">
        <div>提醒：该链接仅用于代客下单或商品下单测试，因该页面不能承载高并发量，所以用于信息流推广等场景时会出现页面打开延迟或无法打开的情况，您可能因此产生推广费用损失。</div>
        <div>如果要进行信息流投放请前往直播商城商品页处，支持投放数据查看（访客点击下单量），支持各种下单限制条件。</div>
      </div>
		<!-- 	<div style="padding-left: 60px;">自定义下单</div>
			<div class="tk">
				<div v-if="link2 != ''">
					<div class="link">自定义下单链接地址：{{link2}}</div>
					<div class="link">
						<el-button type="danger" size="mini" @click="copy2" style="padding:7px 20px !important; ">复制链接</el-button>
						<el-button type="danger" size="mini" @click="open2" style="padding:7px 20px !important; ">打开连接</el-button>
					</div>
					<div class="er">
						<qrcode :value="link2" id="canvas2" :options="{ size: 170 }"></qrcode>
					</div>
					<el-button type="danger" size="mini" @click="gozidingyi" style="padding:7px 20px !important; float: right; margin-right: 20px; position: relative; top: -40px;">编辑自定义下单</el-button>
				</div>
				<div v-if="link2 == ''" style="display: flex; justify-content: center; align-items: center; height: 150px;">
					<div>
						<div>您还未为该商品自定义下单页面</div>
						<div style="text-align: center; margin-top: 20px;">
							<el-button type="danger" size="mini" @click="gozidingyi" style="padding:7px 20px !important; ">点击前往自定义</el-button>
						</div>
					</div>

				</div>


			</div>
			<div class="zhuyi">注：该地址可用于线上直接推送或者网站外链跳转（下单页为H5手机端页面）</div> -->
			<!--			  <span slot="footer" class="dialog-footer">-->
			<!--				<el-button type="primary" @click="log = false">确定</el-button>-->
			<!--			  </span>-->
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="切换产品渠道" :visible.sync="basislog" width="600px">
			<div>
				<el-radio-group v-model="basis" @change="getallshop">
					<el-radio label="1">切换为我发布的产品</el-radio>
					<el-radio label="2">切换为供应商提供的商品</el-radio>
				</el-radio-group>
				<div class="basispro" v-if="basis == 1">
					<el-select v-model="proid" filterable placeholder="请选择产品">
						<el-option v-for="item in prolists" :key="item.id" :label="item.name" :value="item.id"></el-option>
					</el-select>
				</div>
				<div class="basispro" v-if="basis == 2">
					<el-select v-model="shopid" filterable placeholder="请选择商品">
						<el-option v-for="item in shoplists" :key="item.id" :label="item.title" :value="item.id"></el-option>
					</el-select>
				</div>
        <div class="kflexbc" style="margin: 30px 0;">
          <div style="color: #515660;">切换历史记录</div>
          <div class="kflexc" style="color: #0C83FF; cursor: pointer;" v-if="kai" @click="kai = !kai">展开 <i class="el-icon-arrow-down" style="margin-left: 10px; color: #0C83FF;"></i></div>
          <div class="kflexc" style="color: #0C83FF; cursor: pointer;" v-if="!kai" @click="kai = !kai">收缩 <i class="el-icon-arrow-right" style="margin-left: 10px; color: #0C83FF;"></i></div>
        </div>
        <div v-if="!kai" style="max-height: 100px; overflow: auto;">
          <div v-for="item in lishilist" :key="item.id" class="kflexc" style="gap: 20px;">
            <div>{{item.created_at}}</div>
            <div style="margin: 0 10px;">切换为:</div>
            <div>{{item.product_name}}</div>
          </div>
        </div>

			</div>
			<span slot="footer" class="dialog-footer">
				<el-button round @click="basislog = false">取 消</el-button>
				<el-button type="danger" round @click="basisgo">确 定</el-button>
			</span>
		</el-dialog>

		<el-dialog :close-on-click-modal="false" :title="choosenameff" :visible.sync="fanlilogff" width="600px">
			<div>
				<div>设置返利（自号码激活后）：</div>
				<div class="fanlilist">

					<div class="fanlili" v-for="item in fanlilist" :key="item.yue">

						<div>
							<el-checkbox v-model="item.is_rebate"></el-checkbox>
						</div>
						<div class="yuefen" v-if="item.rebate_month != 0 && item.rebate_month != 1">第{{item.rebate_month + 1}}个月</div>
						<div class="yuefen" v-if="item.rebate_month == 0">激活当月</div>
						<div class="yuefen" v-if="item.rebate_month == 1">激活次月</div>
						<div>
							<el-input v-model="item.amount" :disabled="!item.is_rebate" placeholder="请输入金额"></el-input>
						</div>
					</div>

				</div>
				<div class="fanliadd">
					<el-button type="text" @click="addfanli">+添加月份+</el-button>
				</div>
				<div class="guize">
					<el-input v-model="rebate_rule" placeholder="返利备注"></el-input>
				</div>
			</div>
			<span slot="footer" class="dialog-footer">
				<el-button @click="fanlilogff = false">取 消</el-button>
				<el-button type="primary" @click="savefanliff">确 定</el-button>
			</span>
		</el-dialog>

		<el-dialog :close-on-click-modal="false" :title="choosename" :visible.sync="fanlilog" width="850px">
			<div>

				<div class="newcon">
					<div class="newflex">
						<div class="newflexli1" style="padding: 15px 0;">满足条件</div>
						<div class="newflexli2" style="padding: 15px 0;">支出佣金</div>
					</div>
					<div class="newflex">
						<div class="newflexli1 newflex2">
							<div class="newflexli11">
								<el-checkbox v-model="active">已激活</el-checkbox>
							</div>
							<div class="newflexli12"> </div>
						</div>
						<div class="newflexli2">
							<el-input v-model="first_rules.active_commission" @input="inputchoose" placeholder="请输入金额"></el-input>
						</div>
					</div>
					<div class="newflex">
						<div class="newflexli1 newflex2">
							<div class="newflexli11">
								<el-checkbox v-model="first_recharge">已首充</el-checkbox>
							</div>
							<div class="newflexli12">
								<div>充值≥：<el-input v-model="first_rules.first_recharge_one" @input="inputchoose" placeholder="请输入金额"></el-input>
								</div>
								<div>充值≥：<el-input v-model="first_rules.first_recharge_two" @input="inputchoose" placeholder="请输入金额"></el-input>
								</div>
							</div>
						</div>
						<div class="newflexli2">
							<div>
								<el-input v-model="first_rules.first_recharge_one_commission" @input="inputchoose" placeholder="请输入金额"></el-input>
							</div>
							<div>
								<el-input v-model="first_rules.first_recharge_two_commission" @input="inputchoose" placeholder="请输入金额"></el-input>
							</div>
						</div>
					</div>
					<div class="newflex">
						<div class="newflexli1 newflex2">
							<div class="newflexli11">
								<el-checkbox v-model="recharge_amount">累计充值金额</el-checkbox>
							</div>
							<div class="newflexli12">
								<div>充值≥：<el-input v-model="first_rules.recharge_amount_one" @input="inputchoose" placeholder="请输入金额"></el-input>
								</div>
							</div>
						</div>
						<div class="newflexli2">
							<div>
								<el-input v-model="first_rules.recharge_amount_one_commission" @input="inputchoose" placeholder="请输入金额"></el-input>
							</div>
						</div>
					</div>

				</div>
				<div class="newalt" style="margin-top: 20px;">
					当前设定规则：
					<span v-if="active == true">已激活，发放佣金{{first_rules.active_commission}}元.</span>
					<span v-if="first_recharge == true">首充大于{{first_rules.first_recharge_one}}元，发放佣金{{first_rules.first_recharge_one_commission}}元或者</span>
					<span v-if="first_recharge == true">首充大于{{first_rules.first_recharge_two}}元，发放佣金{{first_rules.first_recharge_two_commission}}元.</span>
					<span v-if="recharge_amount == true">累计充值大于{{first_rules.recharge_amount_one}}元，发放佣金{{first_rules.recharge_amount_one_commission}}元且</span>
					<span v-if="recharge_amount == true">累计充值大于{{first_rules.recharge_amount_two}}元，发放佣金{{first_rules.recharge_amount_two_commission}}元.</span>
				</div>

				<!-- 				<div>设置返利（自号码激活后）：</div>
				<div class="fanlilist">

					<div class="fanlili" v-for="item in fanlilist" :key="item.yue">

						<div><el-checkbox v-model="item.is_rebate"></el-checkbox></div>
						<div class="yuefen" v-if="item.rebate_month != 0 && item.rebate_month != 1">第{{item.rebate_month + 1}}个月</div>
						<div class="yuefen" v-if="item.rebate_month == 0">激活当月</div>
						<div class="yuefen" v-if="item.rebate_month == 1">激活次月</div>
						<div><el-input v-model="item.amount" :disabled="!item.is_rebate" placeholder="请输入金额"></el-input></div>
					</div>

				</div>
				<div class="fanliadd"><el-button type="text" @click="addfanli">+添加月份+</el-button></div>
         <div class="guize"><el-input v-model="rebate_rule" placeholder="返利备注"></el-input></div> -->
			</div>
			<span slot="footer" class="dialog-footer">
				<el-button @click="fanlilog = false">取 消</el-button>
				<el-button type="primary" @click="savefanli">确 定</el-button>
			</span>
		</el-dialog>
		<!-- 重要通知 -->
<!-- 		<el-dialog class="tongzhi" :close-on-click-modal="false" :show-close="false"  :visible.sync="tongzhilog" width="800px">
			<div style="background: #EEF7FF; color: #fff; text-align: center; padding: 15px 0; font-size: 20px;">重要通知</div>
			<div style="padding: 20px;">
				<div v-html="tongzhilist[0].content"></div>
				<div>供应商:{{tongzhilist[0].name}}</div>
			</div>
			<span slot="footer" class="dialog-footer">
				<el-button type="danger" @click="yidu(tongzhilist[0].id,1)">我已了解，下一条</el-button>

				<span style="font-size: 16px; margin-left: 20px;">共{{tongzhilists.total}}条</span>
			</span>
		</el-dialog> -->
		<!-- 商品下架 -->
		<el-dialog title="下架确认" :center="true" :close-on-click-modal="false" :show-close="false"  :visible.sync="xiajialog" width="600px">
			<div>
				<div style="margin-bottom: 20px;text-align: center;">下架此商品，分销此商品的分销商，也会强制下架此商品, 是否继续?</div>
				<!-- <el-checkbox v-model="xiajiacheck">向代理商发布下架通知</el-checkbox> -->
				<div   style="text-align: center;">
					<el-checkbox v-model="ischeckedtime">定时下架</el-checkbox>
					<el-date-picker
					style="width: 150px;"
					v-model="downdate"
					value-format="yyyy-MM-dd"
					type="date"
					placeholder="选择日期">
					</el-date-picker>
					<el-time-select
					style="width: 150px;"
					v-model="downtime"
					value-format="HH:mm:ss"
					:picker-options='selectOptions'
					placeholder="选择时间">
					</el-time-select>

				</div>
			</div>
			<span slot="footer" class="dialog-footer">
        <el-button v-if='ischeckedtime' type="danger" round @click="xiajiay(1)">保存定时设置</el-button>
        <el-button v-if='!ischeckedtime' type="danger" round @click="xiajiay(2)">保存定时设置</el-button>

				<!-- <el-button v-if='ischeckedtime' type="danger" round @click="xiajiay(1)">立即下架</el-button> -->
				<el-button type="danger" round @click="xiajiay(0)">立即下架</el-button>

				<el-button round @click="xiajialog = false">取 消</el-button>

			</span>
		</el-dialog>
		<div class="tongzhib" style="z-index: 9999;">
			<div class="tongzhili" style="border: 1px #ccc solid; padding: 10px; border-radius: 5px;" v-for="item in tongzhilist2" :key="item.id">
				<div class="flex" style="justify-content: space-between; border-bottom: 1px #EAEAEA solid; padding-bottom:10px; color: #FFA500;">
					<div v-if="item.type == 4">上游新商品发布通知</div>
					<div v-if="item.type == 5">上游新商品下架通知</div>
          <div @click="yidu2()" style="cursor: pointer;color: #208FFF;">一键关闭</div>
				</div>
				<div class="flex" style="padding-top: 10px; line-height: 25px; justify-content: space-between;">
					<div class="flex">
						<div class="img" v-if="item.image1"><img :src="item.image1"></div>
						<div class="img" v-if="!item.image1"><img src="../../../static/img/kenan.jpg"></div>
						<div v-if="item.type == 4">
							<div style="color: #666666;">{{item.title}}</div>
							<div class="spans" v-if="item.selling_point != ''">
								<span v-for="(item2,i) in item.selling_point" :key="i">{{item2}}</span>
							</div>
						</div>
						<div v-if="item.type == 5">
							<div style="color: #666666;">{{item.title}}</div>
							<div>
								商品已被供应商下线
							</div>
						</div>
					</div>

					<div  style="width: 60px; text-align: right;">
						<el-button type="text"  size="mini" @click="copycode(item.title)">复制商品名</el-button>
						<el-button type="danger" size="mini" style="margin-left: 0; padding: 6px 10px !important;" @click="yidu(item.id)">关闭</el-button>
					</div>
				</div>

			</div>

		</div>

    <el-dialog title="变更记录" :close-on-click-modal="false"   :visible.sync="biangenglog" width="800px">
    	<el-table :data="biangenglist" style="text-align: center;" align="center" border >
    	  <el-table-column label="时间" width="200px">
    	    <template slot-scope="scope">
    	      <span>{{ scope.row.created_at }}</span>
    	    </template>
    	  </el-table-column>
    	  <el-table-column label="规则">
    	    <template slot-scope="scope">
    	      <span v-if="scope.row.active_commission!=0">已激活，发放佣金{{scope.row.active_commission}}元.</span>
    	      <span v-if="scope.row.first_recharge_one!=0">首充大于{{scope.row.first_recharge_one}}元，发放佣金{{scope.row.first_recharge_one_commission}}元或者</span>
    	      <span v-if="scope.row.first_recharge_two!=0">首充大于{{scope.row.first_recharge_two}}元，发放佣金{{scope.row.first_recharge_two_commission}}元.</span>
    	      <span v-if="scope.row.recharge_amount_one!=0">累计充值大于{{scope.row.recharge_amount_one}}元，发放佣金{{scope.row.recharge_amount_one_commission}}元且</span>
    	      <span v-if="scope.row.recharge_amount_two!=0">累计充值大于{{scope.row.recharge_amount_two}}元，发放佣金{{scope.row.recharge_amount_two_commission}}元.</span>
    	    </template>
    	  </el-table-column>

    	</el-table>
    	<span slot="footer" class="dialog-footer">

    		<el-button type="primary" @click="biangenglog = false">确 定</el-button>
    	</span>
    </el-dialog>
		<!-- <foot></foot> -->
	</div>
</template>

<script>
  import alljs from '../../assets/all.js'

	import {
		provinceAndCityData,
		CodeToText,
		TextToCode
	} from 'element-china-area-data'
	import axios from 'axios'
	import top from '@/components/top.vue'
	import left from '@/components/left.vue'
	import foot from '@/components/foot.vue'
	import QRcode from '@xkeshi/vue-qrcode';
	export default {
		components: {
			"left": left,
			"top": top,
			"foot": foot,
			qrcode: QRcode
		},
		name: 'productionDelivery',
		data() {
			return {
        lishilist:[],
        page_id:'',
        kai:false,
        link11:"",
        choosetake_number:0,
				xiajialog:false,
				tongzhilog:false,
				xiajiaid:"",
				xiajiacheck:true,
				active: false,
				first_recharge: false,
				recharge_amount: false,
				first_rules: {
					active_commission: 0,
					first_recharge_one: 0,
					first_recharge_one_commission: 0,
					first_recharge_two: 0,
					first_recharge_two_commission: 0,
					recharge_amount_one: 0,
					recharge_amount_one_commission: 0,
					recharge_amount_two: 0,
					recharge_amount_two_commission: 0
				},

				sanlist: [
     //      {
					// 	name: "中国联通",
					// 	id: 10010
					// },
					// {
					// 	name: "中国移动",
					// 	id: 10086
					// },
					// {
					// 	name: "中国电信",
					// 	id: 10000
					// },
					{name:"中国广电",id:10099},
					// {
					// 	name: "虚拟运营商",
					// 	id: 11111
					// }
				],
				msg: "hello",
				form: {
					title: "",
					parent_name: "",
					mine: "",
					fetch_code: "",
					sku: "",
					product_name: "",
					operator: 10099,
					province: "",
					city: "",
					warn_province: "",
          is_main:"",
          selling_point:""
				},

				checked: false,
				loading: true,
				log: false,
				list: "",
				total: 0,
				chooseid: "",
				choosetitle: '',
				choosename: "",
				choosenameff: "",
				chooseproductid: "",
				link: "",
				link2: "",
				parid: "",
				page: 1,
				pagesize: 20,
				func_C02: false,
				shop_id: "",
				shop_name: "",
				basis: '1',
				prolists: {},
				basislog: false,
				proid: "",
				shopid: "",
				shoplists: {},
				basisshop: "",
				fanlilogff: false,
				fanlilog: false,
				fanlilist: [],
				rebate_rule: "",
				dianpuid: "",
				tongzhilist:[
					{content:"",title:""}
				],
				tongzhilists:{
					page:1,
					pagesize:1,
					total:0
				},
				tongzhilist2:"",
				P0202:false,
				P0203:false,
        P0204:false,
        P0207:false,
        P0208:false,
        biangenglog:false,
        biangenglist:[],
        checked2:false,
		ischeckedtime:false,
		downtime:'',
		downdate:'',
		selectOptions: {
                start: '00:00',
                step: '00:30',
                end: '23:59'
            },
			choosedelay_at:'',
			xunhuan:[],
			multipleSelection: []
			}
		},
    beforeDestroy() {
      document.onkeydown = null
    },
		async created() {

      this.citylist = JSON.parse(JSON.stringify(provinceAndCityData))
      this.citylist.unshift({
        label: "全国归属地随机",
        value: "99999",
        children: []
      })
      this.citylist.unshift({
        label: "全国归属地",
        value: "99998",
        children: []
      })


			//按回车键搜索
			var that = this
			document.onkeydown = function(e) {
				var ev = document.all ? window.event : e;
				if (ev.keyCode == 13) {
					that.search()
				}
			}

			//获取商品
			this.getpro();
			this.dianpuid = JSON.parse(localStorage.getItem('SHOP')).shop_id;

			//权限问题
			var user = JSON.parse(localStorage.getItem('USER'));
			this.user_func = user.functions
			for (var i in this.user_func) {

				if (this.user_func[i] != null) {
					var func_number = this.user_func[i].code
				}
				if (func_number.indexOf("P0202") >= 0) {
					this.P0202 = true
				}
				if (func_number.indexOf("P0203") >= 0) {
					this.P0203 = true
				}
        if (func_number.indexOf("P0204") >= 0) {
        	this.P0204 = true
        }
        if (func_number.indexOf("P0207") >= 0) {
        	this.P0207 = true
        }
        if (func_number.indexOf("P0208") >= 0) {
        	this.P0208 = true
        }

			}



			await axios.get('/api/gth/user/shop')
				.then(response => {
					if (response.data.msg.code == 0) {
						this.shop_id = response.data.data.shop_id
						this.shop_name = response.data.data.shop_name
					} else {
						if (response.data.msg.code == 50401) {
							that.$router.push({
								path: "/login"
							});
							return false
						}
						that.$message.error(response.data.msg.info);
					}
				})
			this.getpros()

			this.gettongzhi()
			this.gettongzhi2()
		},

		methods: {
      getlishilist:function(who){
        // this.chooseid = id
        // this.chooseproductid = productid
        axios.get('/api/plan-market/page/switch_logs',{params:{
          page_id:this.page_id,
          switch_type:this.basis || 0
        }})
        	.then(response => {
        		if (response.data.msg.code == 0) {
              this.lishilist = response.data.data
        		} else {
        			this.$message.error(response.data.msg.info);
        		}
        	})
      },
      kefu:function(id, productid, name){
        this.choosetitle = name
        this.choosename = name + '商品设置返利'
        this.chooseid = id
        this.chooseproductid = productid
        this.$router.push({
        	path: '/productionDelivery/kefuxiugai',
        	query: {
        		id: this.chooseid
        	}
        })
      },
      chaizhuan:function(item,act){
        this.$router.push('/productionDelivery/zhuandan?id='+item.id+'&name='+item.title+'&act='+act)
      },
      biangengshow:function(id,parent_id){
        axios.get('/api/plan-market/commission/page/configs/list',{params:{
          page_id:id,
		  parent_id:parent_id
        }})
        	.then(response => {
        		if (response.data.msg.code == 0) {
              this.biangenglist = response.data.data
              this.biangenglog = true
        		} else {
        			this.$message.error(response.data.msg.info);
        		}
        	})

      },
      zhiding:function(item,n){
        axios.get('/api/plan-market/product/top',{params:{
          id:item.id,
          is_top:n
        }})
        	.then(response => {
        		if (response.data.msg.code == 0) {
              this.$message.success('操作成功');
        			this.getpro()
        		} else {
        			this.$message.error(response.data.msg.info);
        		}
        	})
      },
      zhiding2:function(item,n){
        axios.get('/api/plan-market/product/main',{params:{
          id:item.id,
          is_main:n
        }})
        	.then(response => {
        		if (response.data.msg.code == 0) {
              this.$message.success('操作成功');
        			this.getpro()
        		} else {
        			this.$message.error(response.data.msg.info);
        		}
        	})
      },
			//已读
			yidu:function(id,ff){
				axios.post('/api/sys/notice/set/read',{id:id})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.gettongzhi2()

							if(ff == 1){
								this.tongzhilog = false
								this.gettongzhi()
							}

						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},

      yidu2:function(){
        axios.post('/api/system/notice/all/read')
          .then(response => {
            if (response.data.msg.code == 0) {
              this.gettongzhi2()
              this.gettongzhi()
            } else {
              this.$message.error(response.data.msg.info);
            }
          })
      },

			//获取重要通知
			gettongzhi:function(){
				axios.get('/api/sys/notice/get/notice?type=1&page=' + this.tongzhilists.page + '&page_size=' + this.tongzhilists.pagesize)
					.then(response => {
						if (response.data.msg.code == 0) {
							this.tongzhilist = response.data.data.data
							this.tongzhilists.total = response.data.data.total
							if(this.tongzhilist.length != 0){
								this.tongzhilog = true
							}else{
								this.tongzhilist = [{
									content:"",
									title:""
								}]
							}
							console.log(this.tongzhilist)
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},
			//获取普通通知
			gettongzhi2:function(){
				axios.get('/api/sys/notice/get/notice?type=2')
					.then(response => {
						if (response.data.msg.code == 0) {
							this.tongzhilist2 = response.data.data
							for(let i in this.tongzhilist2){
								this.tongzhilist2[i].selling_point = JSON.parse(this.tongzhilist2[i].selling_point)
							}
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},

			handleCommand(command) {
				if (command == 'goyugu') {
					this.$router.push({
						path: '/productionDelivery/yugu'
					})
				}
				if (command == 'daochu') {
					this.form.title = this.form.title.trim()
					this.form.sku = this.form.sku.trim()
					this.form.parent_name = this.form.parent_name.trim()
					this.form.fetch_code = this.form.fetch_code.trim()

					var url = '/api/gth/order-pages/export?status=100&_page=' + this.page + '&_page_size=' + this.pagesize +
						'&title=' + encodeURIComponent(this.form.title) +
						'&warn_province=' + this.form.warn_province + '&operator=' + this.form.operator + '&province=' + this.form.province +
						'&city=' + this.form.city +
						'&parent_name=' + encodeURIComponent(this.form.parent_name) + '&mine=' + this.form.mine + '&fetch_code=' +
						encodeURIComponent(this.form.fetch_code) +
						'&sku=' + encodeURIComponent(this.form.sku) + '&product_name=' + encodeURIComponent(this.form.product_name)

          axios.get(url)
          .then(response => {
          	if (response.data.msg.code == 0) {
          		this.goid('/productionDelivery/order_export_shangpin')
          	}else {
          		this.$message.error(response.data.msg.info);
          	}
          })



					// location.href = url
				}
				if (command == 'goshangxiajia') {
					this.$router.push({
						path: '/productionDelivery/shangxiajiajilu'
					})
				}
				if (command == 'piliangtongbu') {
					if(this.multipleSelection.length==0){
						this.$message.error('请先选择商品');
						return
					}
					var arr = []
					for(var x=0;x<this.multipleSelection.length;x++){
						arr.push(this.multipleSelection[x].id)
					}

					axios.post('/api/plan-market/psite/order-page/push', {ids:arr})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.$message({
								message: '操作成功',
								type: 'success'
							});
							this.multipleSelection = []
							this.$refs.multipleTable.clearSelection();
						}else {
							this.$message.error(response.data.msg.info);
						}
					})
				}
        if (command == 'piliangxiajia') {
        	if(this.multipleSelection.length==0){
        		this.$message.error('请先选择商品');
        		return
        	}
        	var arr = []
        	for(var x=0;x<this.multipleSelection.length;x++){
        		arr.push(this.multipleSelection[x].id)
        	}

        	axios.post('/api/gth/order-page/batch/off-shelf', {ids:arr})
        	.then(response => {
        		if (response.data.msg.code == 0) {
        			this.$message({
        				message: '操作成功',
        				type: 'success'
        			});
        			this.multipleSelection = []
        			this.$refs.multipleTable.clearSelection();
              this.getpro()
        		}else {
        			this.$message.error(response.data.msg.info);
        		}
        	})
        }

			},
      go:function(url){
        this.$router.push(url)
      },
			goshangxiajia: function() {
				this.$router.push({
					path: '/productionDelivery/shangxiajiajilu'
				})
			},
			goyugu: function() {
				this.$router.push({
					path: '/productionDelivery/yugu'
				})
			},
			inputchoose: function() {
				if (this.first_rules.active_commission != 0 && this.first_rules.active_commission != '') {
					this.active = true
				}

				if (this.first_rules.first_recharge_one != 0 && this.first_rules.first_recharge_one != '') {
					this.first_recharge = true
				}
				if (this.first_rules.first_recharge_one_commission != 0 && this.first_rules.first_recharge_one_commission != '') {
					this.first_recharge = true
				}
				if (this.first_rules.first_recharge_two != 0 && this.first_rules.first_recharge_two != '') {
					this.first_recharge = true
				}
				if (this.first_rules.first_recharge_two_commission != 0 && this.first_rules.first_recharge_two_commission != '') {
					this.first_recharge = true
				}

				if (this.first_rules.recharge_amount_one != 0 && this.first_rules.recharge_amount_one != '') {
					this.recharge_amount = true
				}
				if (this.first_rules.recharge_amount_one_commission != 0 && this.first_rules.recharge_amount_one_commission != '') {
					this.recharge_amount = true
				}
				if (this.first_rules.recharge_amount_two != 0 && this.first_rules.recharge_amount_two != '') {
					this.recharge_amount = true
				}
				if (this.first_rules.recharge_amount_two_commission != 0 && this.first_rules.recharge_amount_two_commission != '') {
					this.recharge_amount = true
				}
			},
			//选择省市区
			changeaddress: function(v) {
        if(v[0] == '99999'){
          this.form.province = '全国归属地随机'
          this.form.city = ""
        }
        else if(v[0] == '99998'){
          this.form.province = '全国归属地'
          this.form.city = ""
        }
        else{
          this.form.province = CodeToText[v[0]]
          this.form.city = CodeToText[v[1]]
        }

			},

			//添加返利
			addfanli: function() {

				var li = {
					is_rebate: false,
					rebate_month: this.fanlilist.length,
					amount: ""
				}
				this.fanlilist.push(li)

			},
			//保存返利
			savefanli: function() {
				var that = this
				var datas = {}
				datas['page_id'] = this.chooseid
				datas['rules'] = this.first_rules

				axios.post('/api/plan-market/commission/page/configs', datas)
					.then(response => {
						if (response.data.msg.code == 0) {
							that.$message.success("保存返利成功！");
							that.fanlilog = false
						} else {
							that.$message.error(response.data.msg.info);
						}
					})
				// axios.post('/api/plan-market/rebate/config',{page_id:this.chooseid,configs:this.fanlilist,rebate_rule:this.rebate_rule})
				// 	.then(response => {
				// 		if(response.data.msg.code == 0){
				// 			that.$message.success("保存返利成功！");
				// 			that.fanlilog = false
				// 		}else{
				// 			that.$message.error(response.data.msg.info);
				// 		}
				// 	})
			},
			//保存返利
			savefanliff: function() {
				var that = this

				for (var i in this.fanlilist) {
					if (this.fanlilist[i].is_rebate == false) {
						this.fanlilist[i]['amount'] = 0
					}
				}

				axios.post('/api/plan-market/rebate/config', {
						page_id: this.chooseid,
						configs: this.fanlilist,
						rebate_rule: this.rebate_rule
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							that.$message.success("保存返利成功！");
							that.fanlilogff = false
						} else {
							that.$message.error(response.data.msg.info);
						}
					})
			},
			goto: function(name) {
				console.log(name)
				this.$router.push({
					path: name
				})
			},
			//更换基础产品
			basisgo: function() {
				this.loading = true
				var that = this
				if (this.basis == 1) {
					axios.post('/api/plan-market/page/product/update', {
							product_id: this.proid,
							page_id: this.chooseid
						})
						.then(response => {
							if (response.data.msg.code == 0) {
								that.$message.success("修改成功");
								that.getpro()
								that.basislog = false
							} else {
								that.$message.error(response.data.msg.info);
							}
						})
				}
				if (this.basis == 2) {
					axios.post('/api/plan-market/page/product/update', {
							parent_page_id: this.shopid,
							page_id: this.chooseid
						})
						.then(response => {
							if (response.data.msg.code == 0) {
								that.$message.success("修改成功");
								that.getpro()
								that.basislog = false
							} else {
								that.$message.error(response.data.msg.info);
							}
						})
				}
			},
			//获取全部基础产品
			getpros: function() {
				var that = this
				axios.get('/api/gth/products/list?page_size=3000')
					.then(response => {
						if (response.data.msg.code == 0) {
							that.prolists = response.data.data.data
						} else {
							that.$message.error(response.data.msg.info);
						}
					})
			},
			getshops: function() {
				//获取商品
				var that = this;
				axios.get('/api/gth/supplier/products?page_size=3000')
					.then(response => {
						if (response.data.msg.code == 0) {
							that.shoplists = response.data.data.data
						} else {
							if (response.data.msg.code == 50401) {
								that.$router.push({
									path: "/login"
								});
								return false
							}
							that.$message.error(response.data.msg.info);
						}
					})
			},
			getallshop: function() {
				if (this.basis == 1) {
					this.getpros()
          this.getlishilist(1)
				}
				if (this.basis == 2) {
					this.getshops()
          this.getlishilist(2)
				}

			},

			//翻页
			fanye: function(page) {
				this.loading = true
				this.page = page
				this.getpro()
			},
			goWebsite() {
				this.$router.push('/productionDelivery/marketsite/siteadmin');
			},
			//跳转到微小店
			goshop: function() {
        window.open(location.origin + '/webapp/weixiaodian/index.html?shop_id='+this.shop_id)

        // if(this.shop_id && this.shop_name){
        //   var user = JSON.parse(localStorage.getItem('USER'));
        //   this.$router.push({
        //   	path: '/minishop',
        //   	query: {
        //   		share_id: this.shop_id,
        //   		shop_name: encodeURI(this.shop_name)
        //   	}
        //   })
        // }

				// window.open(window.location.origin+"/webapp/merchant/orderlist1.html?share_id="+this.shop_id)
			},
			//复制微小店连接
			copyshop: function() {
				var user = JSON.parse(localStorage.getItem('USER'));

				var links = window.location.origin + "/#/minishop?share_id=" + this.shop_id + "&shop_name=" + encodeURI(this.shop_name)
				var that = this;
				this.$copyText(links)
					.then(res => {
						that.$message.success("复制成功");
					});
			},
			//跳转
			tiaozhuanp: function(add) {
				this.$router.push({
					path: add
				})
			},
			//选择只显示我发布的产品
			chooseparid: function() {
				this.loading = true
				if (this.form.mine == 1) {
					this.form.mine = ""
				} else {
					this.form.mine = 1
				}
				this.getpro();
			},
      chooseparid2:function(){
        if(this.checked2){
          this.from.is_main = 1
        }else{
          this.from.is_main = ""
        }
        this.getpro();
      },
			//跳转
			tiaozhuan: function(id, orderid, product_id) {
        console.log(window.location.origin +  window.location.pathname + "#/productionDelivery/shopdetail?id=" + id)
				// var type = 1 //看看是不是自己的商品 1是 2不是
				// if(id == orderid){type = 1}else{type = 2}

				// if( this.shop_id == 50481  || this.shop_id == 304676){
				//     if(type == 1){
				//         window.open(window.location.origin+"/#/productHistory?id="+product_id+"&type="+type)
				//     }else{
				//         console.log(type)
				//         window.open(window.location.origin+"/#/productHistory?id="+id+"&type="+type)
				//     }
				// }else{
				//     window.open(window.location.origin+"/#/productSee?id="+id)
				// }
				window.open(window.location.origin +  window.location.pathname + "#/productionDelivery/shopdetail?id=" + id)
			},
			//复制链接
			copy: function() {
				var that = this;
				this.$copyText(this.link)
					.then(res => {
						that.$message.success("复制成功");
					});
			},
			//复制链接2
			copy2: function() {
				var that = this;
				this.$copyText(this.link2)
					.then(res => {
						that.$message.success("复制成功");
					});
			},
      copy11: function() {
      	var that = this;
      	this.$copyText(this.link11)
      		.then(res => {
      			that.$message.success("复制成功");
      		});
      },
			//复制
			copycode: function(code) {
				var that = this;
				this.$copyText(code)
					.then(res => {
						that.$message.success("复制成功");
					});
			},
			//跳转页面
			open: function() {
				// var user = JSON.parse(localStorage.getItem('USER'));
    //     let urls = window.location.origin
    //     if(urls.includes('gantanhao.vip')){
    //       urls = 'https://shop.gantanhao.vip'
    //     }
				window.open(this.link)
			},
			//跳转页面2
			open2: function() {
				var user = JSON.parse(localStorage.getItem('USER'));
        let urls = window.location.origin
        if(urls.includes('gantanhao.vip')){
          urls = 'https://shop.gantanhao.vip'
        }
				window.open(urls + "/h5/#/h5template?share_id=" + this.shop_id + "&id=" + this.chooseid)
			},
      open11: function() {
      	// var user = JSON.parse(localStorage.getItem('USER'));
       //  let urls = window.location.origin
       //  if(urls.includes('gantanhao.vip')){
       //    urls = 'https://shop.gantanhao.vip'
       //  }
      	window.open(this.link11)
      },
			//跳转编辑
			gozidingyi: function() {
				this.$router.push({
					path: '/h5template',
					query: {
						id: this.chooseid,
						title: this.choosetitle
					}
				})
			},
			//分享链接
			share: function(id, titie,take_number,link_params) {
				var that = this
				this.chooseid = id
				this.choosetitle = titie
        this.choosetake_number = take_number
				//拼装分享地址
				axios.get('/api/gth/user/shop')
					.then(response => {
						if (response.data.msg.code == 0) {
              let urls = window.location.origin
              if(urls.includes('gantanhao.vip')){
                urls = 'https://shop.gantanhao.vip'
              }
							that.link = urls + "/webapp/merchant/templet1.html?link_params="+link_params

              that.link11 = urls + "/webapp/gantanhaoluodi/index.html?link_params="+link_params
							axios.post('/api/plan-market/static/check', {
									id: id
								})
								.then(response => {
									if (response.data.msg.code == 0 && response.data.data == true) {
										that.link2 = urls + "/h5/#/h5template?share_id=" + this.shop_id + "&id=" + this.chooseid
										that.log = true
									} else {
										that.link2 = ''
										that.log = true
									}
								})
							// this.link2 = window.location.origin+"/h5/#/h5template?share_id="+this.shop_id+"&id="+this.chooseid
							// this.log = true
						} else {
							if (response.data.msg.code == 50401) {
								that.$router.push({
									path: "/login"
								});
								return false
							}
							that.$message.error(response.data.msg.info);
						}
					})

			},
			//保存要修改商品的id和产品id
			choosefixid: function(id, productid, name) {
				console.log(id)
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
			},
			//修改商品信息页面跳转
			ccc: function(id, productid, name) {
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.$router.push({
					path: '/productionDelivery/fixPros',
					query: {
						id: this.chooseid
					}
				})
			},
			bbb: function(id, productid, name) {
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.$router.push({
					path: '/productionBasismanag/fixproductionBasis',
					query: {
						id: this.chooseproductid
					}
				})
			},
			fff: function(id, productid, name) {
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.rebate_rule = ''
				var that = this
				axios.get('/api/plan-market/rebate/config?page_id=' + this.chooseid)
					.then(response => {
						if (response.data.msg.code == 0) {

							for (var i in response.data.data) {
								if (response.data.data[i].amount != '' && response.data.data[i].amount != 0) {
									response.data.data[i]['is_rebate'] = true
								}
							}

							that.fanlilist = response.data.data

							if (that.fanlilist != '') {
								that.rebate_rule = that.fanlilist[0].rebate_rule
							}

							that.fanlilogff = true

						} else {
							that.$message.error(response.data.msg.info);
						}
					})
			},
			eee: function(id, productid, name,page_id) {
				this.choosetitle = name
        this.page_id = id
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.basislog = true
        this.getlishilist(1)
			},
			aaa: function(id, productid, name) {
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.$router.push({
					path: '/productionDelivery/fixproductmoney',
					query: {
						id: this.chooseid
					}
				})
			},
      ppp2: function(id, productid, name) {
      	this.$router.push({
      		path: '/productionDelivery/kadanduilie',
      		query: {
      			id:id,
      		}
      	})
      },
			ppp: function(id, productid, name) {
				this.choosetitle = name
				this.choosename = name + '商品设置返利'
				this.chooseid = id
				this.chooseproductid = productid
				this.$router.push({
					path: '/productionDelivery/watchMyDistributor',
					query: {
						id: this.chooseid,
						title: this.choosetitle
					}
				})
			},
			choosefix: function(command) {


				if (command == "g") {
					this.$router.push({
						path: '/productionBasismanag/moneyset',
						query: {
							id: this.chooseproductid
						}
					})
				}
				if (command == "h5") {
					this.$router.push({
						path: '/h5template',
						query: {
							id: this.chooseid,
							title: this.choosetitle
						}
					})
				}

				if (command == "f") {
					//先获取一下商品返利
					this.rebate_rule = ''
					var that = this
					axios.get('/api/plan-market/commission/page/configs?page_id=' + this.chooseid)
						.then(response => {
							if (response.data.msg.code == 0) {
								if (response.data.data.rules != null) {
									that.first_rules = response.data.data.rules
									that.inputchoose()
								}

								that.fanlilog = true
							} else {
								that.$message.error(response.data.msg.info);
							}
						})
					// axios.get('/api/plan-market/rebate/config?page_id='+this.chooseid)
					// 	.then(response => {
					// 		if(response.data.msg.code == 0){
					// 			that.fanlilist = response.data.data
					// 			if( that.fanlilist != ''){
					// 				that.rebate_rule = that.fanlilist[0].rebate_rule
					// 			}

					// 			that.fanlilog = true
					// 			for( var i in that.fanlilist){
					// 				if(that.fanlilist[i].amount != ''){
					// 					that.fanlilist[i]['is_rebate'] = true
					// 				}
					// 			}
					// 		}else{
					// 			that.$message.error(response.data.msg.info);
					// 		}
					// 	})

				}
			},
			//搜索
			search: function() {
				this.page = 1
				this.loading = true
				this.getpro()
			},
			//导出商品
			daochu: function() {

				this.form.title = this.form.title.trim()
				this.form.sku = this.form.sku.trim()
				this.form.parent_name = this.form.parent_name.trim()
				this.form.fetch_code = this.form.fetch_code.trim()

				var url = '/api/gth/order-pages/export?status=100&_page=' + this.page + '&_page_size=' + this.pagesize +
					'&title=' + encodeURIComponent(this.form.title) +
					'&warn_province=' + this.form.warn_province + '&operator=' + this.form.operator + '&province=' + this.form.province +
					'&city=' + this.form.city +
					'&parent_name=' + encodeURIComponent(this.form.parent_name) + '&mine=' + this.form.mine + '&fetch_code=' +
					encodeURIComponent(this.form.fetch_code) +
					'&sku=' + encodeURIComponent(this.form.sku) + '&product_name=' + encodeURIComponent(this.form.product_name)
				location.href = url

			},
			//获取商品
			getpro: function() {

				var that = this;

        this.form.title = this.form.title.trim()
        this.form.sku = this.form.sku.trim()
        this.form.parent_name = this.form.parent_name.trim()
        this.form.fetch_code = this.form.fetch_code.trim()

        let obj = {
          status:100,
          _page:this.page,
          _page_size:this.pagesize,
          warn_province:this.form.warn_province,
          operator:this.form.operator,
          province:this.form.province,
          city:this.form.city,
          title:this.form.title,
          parent_name:this.form.parent_name,
          mine:this.form.mine,
          fetch_code:this.form.fetch_code,
          sku:this.form.sku,
          product_name:this.form.product_name,
          selling_point:this.form.selling_point
        }

        // axios.get('/api/gth/order-pages2?status=100&_page=' + this.page + '&_page_size=' + this.pagesize +
        // 		'&title=' + encodeURIComponent(this.form.title) +
        // 		'&warn_province=' + this.form.warn_province + '&operator=' + this.form.operator + '&province=' + this.form.province +
        // 		'&city=' + this.form.city +
        // 		'&parent_name=' + encodeURIComponent(this.form.parent_name) + '&mine=' + this.form.mine + '&fetch_code=' +
        // 		encodeURIComponent(this.form.fetch_code) +
        // 		'&sku=' + encodeURIComponent(this.form.sku) + '&product_name=' + encodeURIComponent(this.form.product_name))

				axios.get('/api/gth/order-pages2',{params:obj})
					.then(response => {
						if (response.data.msg.code == 0) {
							that.total = response.data.data.total
							that.list = response.data.data.data
							for(var x=0;x<that.list.length;x++){
								that.list[x].djs=''
							}
							that.daojishi()
              // if(this.list){
              //   this.list.forEach(item=>{
              //     item.image1 = alljs.morentu(item.image1)
              //   })
              // }

							that.loading = false
						} else {
							if (response.data.msg.code == 50401) {
								that.$router.push({
									path: "/login"
								});
								return false
							}
							that.$message.error(response.data.msg.info);
						}
					})
			},
			//下架确认
			xiajiay:function(type){
				var that = this;
				var formData = new FormData();
				formData.append("order_page_id", this.xiajiaid);
				formData.append("status", 0);
				formData.append("is_timing_removal", type);
				formData.append("delay_at", this.downdate+' '+this.downtime);
				axios.post('/api/gth/order-page/put-sale', formData)
					.then(response => {
						if (response.data.msg.code == 0) {
							this.loading = true
							this.getpro()
							this.xiajialog = false
						}else {
							that.$message.error(response.data.msg.info);
						}
					})
			},
			//下架
			xiajia: function(id,delay_at) {
				this.xiajiaid = id
				this.xiajialog = true
				this.choosedelay_at = delay_at
				if(delay_at){
					this.ischeckedtime = true
					var arr = delay_at.split(' ')
					this.downdate = arr[0]
					this.downtime = arr[1].slice(0,-3)

				}else{
					this.ischeckedtime = false
					this.downdate = ''
					this.downtime = ''
				}
			},
			loggo: function() {

			},
			daojishi(){
				for(var i = 0;i<this.list.length;i++){
					var djstiem =  setInterval((i)=>{
						var item = this.list[i]
            if(this.list[i].delay_at && this.list[i].delay_at != null){

              item.djs = this.timediff(this.getNowDate(),this.list[i].delay_at)
            }else{
              item.djs = ''
            }

						this.$set(this.list,i,item)
					},1000,i)
					this.xunhuan.push(djstiem)
				}
			},
			timediff(begin_time,end_time){
				// var begin_time = '2020-01-01 12:00:00'
				// var end_time = '2020-01-04 16:30:28'
				//年月日时分秒转换为时间戳
				let beginTime = (new Date(begin_time).getTime()) / 1000;
				let endTime = (new Date(end_time).getTime()) / 1000;
				var starttime = ''
				var endtime = ''
				if (beginTime < endTime) {
					starttime = beginTime;
					endtime = endTime;
				} else {
					starttime = endTime;
					endtime = beginTime;
				}
				//计算天数
				var timediff = endtime - starttime;
				var days = parseInt(timediff / 86400);
				//计算小时数
				var remain = timediff % 86400;
				var hours = parseInt(remain / 3600);
				//计算分钟数
				var remain = remain % 3600;
				var mins = parseInt(remain / 60);

				var res =  days+'天'+hours + '小时' + mins + '分';
				// console.log(res)
				//返回 3天4小时30分
				return res;
			},
			//获取当前时间年月日时分秒
			getNowDate(){
				var date = new Date();
				var sign2 = ":";
				var year = date.getFullYear() // 年
				var month = date.getMonth() + 1; // 月
				var day = date.getDate(); // 日
				var hour = date.getHours(); // 时
				var minutes = date.getMinutes(); // 分
				var seconds = date.getSeconds() //秒
				var weekArr = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
				var week = weekArr[date.getDay()];
				// 给一位数的数据前面加 "0"
				if (month >= 1 && month <= 9) {
				month = "0" + month;
				}
				if (day >= 0 && day <= 9) {
				day = "0" + day;
				}
				if (hour >= 0 && hour <= 9) {
				hour = "0" + hour;
				}
				if (minutes >= 0 && minutes <= 9) {
				minutes = "0" + minutes;
				}
				if (seconds >= 0 && seconds <= 9) {
				seconds = "0" + seconds;
				}
				// console.log(year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds)
				//返回格式2022-11-25 10:25:39

				return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
			},
			handleSelectionChange(val){
				console.log(val)
				this.multipleSelection = val
			},
		},
		beforeDestroy() {
			for(var x=0;x<this.xunhuan.length;x++){
				clearInterval(this.xunhuan[x]);
			}
			this.xunhuan=[]

		},

	}
</script>
<style scoped lang="scss">
  @import "@/assets/zuixin.scss";
.t_djs{
	position: absolute;
	top: 0;
	left: 0;
	background: rgba(255, 44, 81, 0.29);
	border: 1px solid #2974FF;
	font-size: 12px;
	padding: 2px 8px;
	color: #4B0101;
}
</style>
<style lang="scss" scoped>
  .btm2{
    /deep/ .el-button.is-round {
        padding: 14px 23px !important;
    }
  }

  /deep/ .el-button--danger {
      color: #FFF;
      background-color: #2974FF;
      border-color: #2974FF;
  }
  /deep/ td.my-cell{vertical-align: top; padding-top: 20px;}
	.spans {
		span:nth-child(1) {
			color: #FF0024;
			border: 1px #FF0024 solid;
		}

		span:nth-child(2) {
			color: #FBB03B;
			border: 1px #FBB03B solid;
		}

		span:nth-child(3) {
			color: #2e317c;
			border: 1px #2e317c solid;
		}

		span {
			border: 1px #ccc solid;
			margin-right: 10px;
			padding: 2px 8px;
			border-radius: 3px;
		}
	}
	.tongzhib{ position: fixed; right:20px; bottom:20px;
		.flex{ display:flex;}
		.tongzhili{ width: 300px; background: #FFFFFF; margin-bottom: 10px; font-size: 14px;
			img{ width: 50px; margin-right: 10px; display: block;}
		}
	}
	.tongzhi{
		.el-dialog__body{ padding: 0 0px;}
		.el-dialog__header{ padding: 0;}
	}
	.fz12 {
		.el-dropdown-menu__item {
			font-size: 14px;
		}
	}

	.tdbtn {
		div {
			line-height: 33px;
			cursor: pointer;
			color: #409EFF;
		}
	}

	.index {

    /deep/ .el-table th{  background: #F9F9F9;}

    .slh{white-space: nowrap;
      	text-overflow: ellipsis;
      	overflow: hidden;
      	word-break: break-all; max-width: 140px;}

    .yansebutong {
      margin-right: 10px; line-height: 20px; color: #000;
      margin-bottom: 5px;padding: 0 5px;border-radius: 2px;
      border: 1px #000 solid;
    }

    .yansebutong:nth-child(1) {
        border: 1px #2974FF solid; color: #2974FF;
    }

    .yansebutong:nth-child(2) {

       border: 1px #FBB03B solid; color: #FBB03B;
    }

    .yansebutong:nth-child(3) {

       border: 1px #409EFF solid; color: #409EFF;
    }

    .yansebutong:nth-child(4) {
       border: 1px peru solid; color: peru;

    }
    .yansebutong:nth-child(5) {
       border: 1px peru solid; color: peru;

    }

		.newcon {
			width: 800px;
			border: 1px #EAEAEA solid;

			.newflex {
				display: flex;
				justify-content: center;
				align-items: center;
				text-align: center;
				border-bottom: 1px #EAEAEA solid;

				.newflexli1 {
					flex: 2;

					.newflexli11 {
						flex: 1;
						line-height: 36px;
						display: flex;
						justify-content: center;
						align-items: center;
					}

					.newflexli12 {
						flex: 1;
						border-left: 1px #EAEAEA solid;

						/deep/ .el-input {
							width: 120px;
							margin: 5px 0;
						}
					}
				}

				.newflexli2 {
					flex: 1;
					border-left: 1px #EAEAEA solid;

					/deep/ .el-input {
						width: 60%;
						margin: 5px 0;
					}
				}

				.newflex2 {
					display: flex;
					width: 100%;
					justify-content: center;
					align-items: center;
				}
			}

		}

		.searchflex {
			display: flex;
			flex-wrap: wrap;
      gap: 20px;
			/deep/ .el-form-item {
				margin-bottom: 0px !important;
			}
		}

		/deep/ .el-input--suffix .el-input__inner {
			padding-right: 15px !important;
		}

		.fanlilist {
			padding: 20px;
		}

		.fanlili {
			display: flex;
			margin-bottom: 10px;
			flex-wrap: wrap;

			.el-checkbox {
				padding: 5px 10px;
				line-height: 26px;
			}

			.yuefen {
				padding: 5px 10px;
				line-height: 26px;
				width: 80px;
			}
		}

		.guize {
			width: 100%;
			margin-bottom: 20px;
		}

		.fanliadd {
			text-align: center;
		}



				.bor1 {
					border-right: 1px #eaeaea solid;
				}

				.o_ul {
					background: #F9F9F9;
					display: flex;

					.o_li {
						flex-basis: 160px;
						line-height: 45px;
						display: block;
						color: #727272;
						border-top: 3px #F9F9F9 solid;
						font-size: 14px;
						text-align: center;
					}

					.act {
						border-top: 3px #DD2727 solid;
						background: #FFFFFF;
					}
				}

				.btm {
					border-bottom:10px #EAEAEA solid;

					/deep/ .el-button--danger {
						margin-left: 80px;

					}
				}

				.row {
					padding: 20px;

					.flex2 {
						display: flex;
					}

					/deep/ .el-form {
						display: flex;
						flex-basis: 900px;

						/deep/ .el-form-item {
							margin-bottom: 0;
						}

						/deep/ .el-button {
							margin-left: 20px;
						}
					}

				}

				.row2 {
					display: flex;
					padding-left: 30px;
					justify-content: space-between;
					padding-right: 20px;
					padding-top: 20px;

					/deep/ .el-button {
						margin-right: 0px;

						a {
							color: #FFFFFF;
						}
					}

					/deep/ .el-button--primary {
						padding: 8px 20px;
					}

					.only {
						padding: 7px;
					}
				}

				.row3 {
					background: #EE1B4E;
					padding: 10px 0;
					color: #FFFFFF;
					line-height: 50px;
					display: flex;
					margin-top: 30px;
					margin-bottom: 15px;
					justify-content: space-between;

					.row2 {
						padding-top: 0;
						flex: 1;
						padding: 0 40px 0 80px;
					}

					.dlogo {
						margin-left: 0px;
						background: #FFFFFF;
						border-radius: 25px;
						margin-right: 10px;

						img {
							width: 30px;
							display: block;
							padding: 10px;
						}
					}

					.wlogo {
						img {
							width: 40px;
							display: block;
							padding: 5px;
						}
					}

					.dtitle {
						font-size: 20px;
						cursor: pointer;
					}

					.dlogo2 {
						background: #FFFFFF;
						color: #EEF7FF;
						font-size: 20px;
						cursor: pointer;
						display: flex;
						justify-content: center;
						align-items: center;
						border-radius: 14px;
						width: 24px;
						;
						height: 24px;
						position: relative;
						top: 13px;
						left: 10px;
					}

					.dcon {
						font-size: 14px;
					}

					.dget {
						cursor: pointer;
						line-height: 26px;
						color: #EEF7FF;
						font-size: 14px;
						background: #FFFFFF;
						height: 26px;
						margin-top: 14px;
						padding: 0px 20px;
						border-radius: 15px;
					}

					.dmy {
						cursor: pointer;
						font-size: 14px;
						padding: 0 20px;
					}
				}

				.list:nth-child(2) {
					border-top: 0;
				}

				.list {
					display: flex;
					color: #727272;
					border-top: 1px #EAEAEA solid;
					font-size: 14px;
					text-align: left;

					/deep/ .el-dropdown {
						color: #197CFF
					}

					&:hover {
						background: #EFEFEF
					}

					.th1 {
						flex-basis: 370px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					.th2 {
						flex-basis: 120px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					// .th3{ flex-basis: 100px; background: #F9F9F9; line-height: 45px; text-align: center;}
					.th4 {
						flex-basis: 250px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					.th5 {
						flex-basis: 145px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					.th6 {
						flex-basis: 145px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					.th8 {
						flex-basis: 130px;
						background: #F9F9F9;
						line-height: 45px;
						text-align: center;
						box-sizing: border-box;
					}

					.td1 {
						overflow: hidden;
						padding: 15px 20px;
						width: 130px;
						cursor: pointer;
						height: 170px;
						overflow: hidden;
						box-sizing: border-box;

						img {
							width: 90px;
							display: block;
						}
					}

					.td2 {
						overflow: hidden;
						flex-basis: 240px;
						font-size: 14px;
						padding: 15px 0;
						box-sizing: border-box;

						.title {
							height: 40px;
							line-height: 20px;
							font-size: 14px;
							color: #197CFF;
							cursor: pointer;
						}

						.yd {
							line-height: 20px;
							height: 30px;
							cursor: pointer;

							span:nth-child(1) {
								color: #FF0024;
								border: 1px #FF0024 solid;
							}

							span:nth-child(2) {
								color: #FBB03B;
								border: 1px #FBB03B solid;
							}

							span:nth-child(3) {
								color: #2e317c;
								border: 1px #2e317c solid;
							}

							span {
								border: 1px #ccc solid;
								margin-right: 10px;
								padding: 2px 8px;
								border-radius: 3px;
							}
						}

						.alt {
							line-height: 20px;
							color: #808080;
							cursor: pointer;
						}
					}

					.td3 {
						overflow: hidden;
						flex-basis: 120px;
						line-height: 20px;
						font-size: 14px;
						text-align: center;
						padding: 0px 15px;
						box-sizing: border-box;
					}

					.td4 {
						overflow: hidden;
						flex-basis: 130px;
						font-size: 14px;
						overflow: hidden;
						text-align: center;
						padding: 15px 5px;
						box-sizing: border-box;

						/deep/ .el-tooltip {
							width: 100%;
							white-space: nowrap;
							text-overflow: ellipsis;
							overflow: hidden;
						}
					}

					.td5 {
						overflow: hidden;
						flex-basis: 140px;
						font-size: 14px;
						text-align: center;
						padding: 15px 0;
						box-sizing: border-box;
					}

					.td6 {
						overflow: hidden;
						flex-basis: 145px;
						font-size: 14px;
						text-align: center;
						padding: 15px 0;
						box-sizing: border-box;
					}

					.td7 {
						overflow: hidden;
						flex-basis: 145px;
						font-size: 14px;
						line-height: 30px;
						text-align: center;
						padding: 15px 0;
						box-sizing: border-box;

						/deep/ .el-button {
							margin-left: 0;
							margin-bottom: 5px;
						}

						/deep/ .el-dropdown {
							cursor: pointer;
							font-size: 14px;
						}
					}

					.td8 {
						flex-basis: 250px;
						font-size: 14px;
						text-align: center;
						padding: 15px 5px;
						line-height: 20px;
						box-sizing: border-box;
					}
				}

				.el-pagination {
					text-align: right;
					margin: 20px 0
				}


		.tk {
			background: #F3F3F3;
			margin: 20px 60px;
			padding: 20px 0;

			.num {
				background: #EEF7FF;
				width: 44px;
				line-height: 44px;
				text-align: center;
				color: #FFFFFF;
				font-size: 25px;
				border-radius: 22px;
			}

			.link {
				text-align: center;
				padding: 10px 0;

			}

			.er {
				text-align: center;

				img {
					width: 164px;
				}
			}
		}

		.zhuyi {
			text-align: center;
			padding: 10px 0;
			color: #EEF7FF;
		}

		.basispro {
			margin-top: 20px;
		}
    .dh{
      font-size: 14px; cursor: pointer;
      font-weight: bold;
      background: linear-gradient(117.53deg, rgb(12, 131, 255),rgb(255, 0, 246));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      position: relative;
      overflow: hidden;
    }
    .dh2{
      position: absolute; left: 0; top: -12px; height: 46px; width: 10px; transform: rotate(45deg); background: rgba(255, 255, 255, 0.5); animation: haha 2s infinite forwards; z-index: 2;
    }
    @keyframes haha {
      0% {
        left:0
      }
      100% {
        left: 100%;
      }
    }

	}
</style>
